package re;

import nc.md.MDBaseQueryFacade;
import nc.vo.tc.monthlyApprove.msz.View_Audit;

public class tre {
	public tre() {
		String strWhere = "((bdgt_audit.month = 2 AND bdgt_audit.m_year = '3333')) and (isnull(dr,0)=0) and pk_corp='1001'";
		strWhere="";
		String[] andsz = strWhere.split(" AND ");
		String month = null;
		String m_year = null;
		for (int i = 0; i < andsz.length; i++) {
			String[] bdgt_audit_month = andsz[i].split("bdgt_audit.month = ");
			String[] bdgt_audit_m_year = andsz[i].split("bdgt_audit.m_year = ");
			if (bdgt_audit_month.length > 1) {
				int p = bdgt_audit_month[1].indexOf(")");
				if (p == -1) {
					month = bdgt_audit_month[1];
				} else {
					month = bdgt_audit_month[1].substring(0, p);
				}
			} else if (bdgt_audit_m_year.length > 1) {
				int p = bdgt_audit_m_year[1].indexOf(")");
				if (p == -1) {
					m_year = bdgt_audit_m_year[1];
				} else {
					m_year = bdgt_audit_m_year[1].substring(0, p);
				}
			}
		}
		if (m_year!=null) {
			m_year=m_year.replaceAll("'","");
		}
		
		System.out.println(month);
		System.out.println(m_year);
	}
}
